Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
Multiple "add field" buttons for form field on Qualtrics using Javascript

I am trying to create a survey page in Qualtrics that has multiple form field questions. Responders may want to add up to 10 responses, but to streamline the UI, I want to initially only show one field, with the option to add a field if they need more than one field.

I have been able to make an "add field" button that works for the top question, but when I use multiple questions with the same Javascript, only the first "add Field" button works, and it adds the extra field for every question on the page. Clicking the "add field button" for subsequent questions doesn't seem to work.

Javascript code to create the "Add field button" can be seen below:

Qualtrics.SurveyEngine.addOnload(function(){

var cs = jQuery("#"+this.questionId+" .ChoiceStructure");
cs.find("tr:not(:lt(1))").hide();
cs.append("<input type='button' id='add' value='Add field' name='+' />");
jQuery("#add").on('click',function(){
    var c = cs.find("tr:visible").length;
    cs.find("tr:eq("+c+")").show(); 
});

});

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!